package o;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.util.ArrayList;
import java.util.List;

public class zb {
    private final List<d<?>> ˋ = new ArrayList();

    static final class d<T> {
        private final Class<T> ˊ;
        final ry<T> ॱ;

        d(@NonNull Class<T> cls, @NonNull ry<T> ryVar) {
            this.ˊ = cls;
            this.ॱ = ryVar;
        }

        boolean ˏ(@NonNull Class<?> cls) {
            return this.ˊ.isAssignableFrom(cls);
        }
    }

    @Nullable
    public synchronized <T> ry<T> ˊ(@NonNull Class<T> cls) {
        ry<T> ryVar;
        for (d dVar : this.ˋ) {
            if (dVar.ˏ(cls)) {
                ryVar = dVar.ॱ;
                break;
            }
        }
        ryVar = null;
        return ryVar;
    }

    public synchronized <T> void ˋ(@NonNull Class<T> cls, @NonNull ry<T> ryVar) {
        this.ˋ.add(new d(cls, ryVar));
    }
}
